#!/usr/bin/node
const log=console.log,
      time=global.setInterval(loop,500);
log("start");

function loop(){
  log('i will loop forver');
  if(count==6){
    clearInterval(time);
  }
}


global.setTimeout(function(){
  global.clearInterval(time);
  log('end');

},3000);

var count =0;
